package init.luoyu.action.chapter2.test;

import init.luoyu.action.chapter1.Apple;

/**
 * @author LuoYu
 * 2020/11/22
 **/
public class PrintWeight implements ApplePrinter{
    @Override
    public String accept(Apple apple) {
        StringBuilder builder = new StringBuilder();
        builder.append("当前苹果重量为: ");
        builder.append(apple.getWeight());
        return builder.toString();
    }
}
